package minidb.parse.exps;

import java.io.Serializable;

public class Predicate implements Serializable
{
	public int op;
	public Operand operand1;
	public Operand operand2;
	
	public Predicate(int op,Operand o1,Operand o2)
	{
		this.op=op;
		this.operand1=o1;
		this.operand2=o2;
	}
	
	public Predicate DupPredicate()
	{
		return new Predicate(this.op,this.operand1.DupOperand(),this.operand2.DupOperand());
	}
	
	public String Print()
	{
		return this.operand1.Print()+SQLExp.GetSym(this.op)+this.operand2.Print();
	}
	
	public String Print_Base()
	{
		return this.operand1.Print_Base()+SQLExp.GetSym(this.op)+this.operand2.Print_Base();
	}
}
